%{

#include <math.h>
#include <string.h>
#include <time.h>


#define BufSizF 256
#define MaxBufSizF 2048

struct tm tm;
int num_lines = 0, num_chars = 0;
int state_chg[3];

int i;
int fp0,fp1,fp2,fp3,fp4,fp5;


char buf_file[MaxBufSizF]={'\0'};
char buf_email[MaxBufSizF]={'\0'};
char buf_seconds[MaxBufSizF]={'\0'};
char buf[MaxBufSizF]={'\0'};

char *p;

class p {

public:
  p():k(0) {}
private:
  int k;
};




%}


%s  state0 statef statee state3 state4 state5 state6 state7 state8 skip
%s  state9 state10 state11

%s  lstate0 lstate1 lstate2 

%s  mstate0 mstate1 mstate2 

%s   pstate0 pstate1 pstate2

%s   dpstate0 dpstate1 dpstate2

%s   swstate0 swstate1 swstate2

%s   curstate0 curstate1

DIGIT    [0-9]
CAP      [A-Z]


%%

\n             ++num_lines;  ++num_chars; BEGIN(state0);



^"logfile"[ |\t]* {
                    static bool config = false;
                    if(config == false)
                    {
                     fprintf(stderr,"was false\n");
                     config=true;
                     BEGIN(statef);
                    }
              }


<statef>.*  {
                  snprintf(buf_file,MaxBufSizF,"%s",yytext);
                  fprintf(stderr,"here in state1\n");
                  BEGIN(state0);
                  }

^"email"[ |\t]* {
                    static bool config = false;
                    if(config == false)
                    {
                     fprintf(stderr,"was false\n");
                     config=true;
                     BEGIN(statee);
                    }
              }

<statee>.*  {
                  snprintf(buf_email,MaxBufSizF,"%s",yytext);
                  fprintf(stderr,"here in statee\n");
                  BEGIN(state0);
                  }

.            ++num_chars;

%%
